<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<title>修改角色</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<link rel="shortcut icon" href="favicon.ico">
</head>
<lui:context/>
<u:View basePath="/res-system/role/" userJS="roleUpdate" delayLoadJs="false">
<body>
<form id="roleUpdateFrm" class="m-cust">
    <lui:dialogBody>
        <lui:ajax url="${ctx }/sys/role/update/" id="updateRoleAjax" type="post" formQuery="#roleUpdateFrm" formSubmit="true" contentType="application/x-www-form-urlencoded"
            onSuccess="RoleUpdatePage.updateRoleSucc" prompt="true"/>
        <lui:ajax url="${ctx }/sys/role/findOne/${requestScope.roleId }" id="findOneRoleAjax" autoSend="true" onSuccess="RoleUpdatePage.onFindOneSucc"/>
        <input name="roleId" id="roleId" hidden="hidden" value="${requestScope.roleId }">
        <div class="form-group row">
            <div class="col-sm-12 col-md-12">
                <div class="col-sm-2 col-md-2 col-xs-2">
                    <label class="m-label required" for="roleName">角色名称</label>
                </div>
                <div class="col-sm-8 col-md-8 col-xs-8">
                    <input class="form-control m-input" type="text" name="roleName" id="roleName" maxlength="64">
                </div>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-sm-12 col-md-12">
                <div class="col-sm-2 col-md-2 col-xs-2">
                    <label class="m-label required" for="roleCode">角色编码</label>
                </div>
                <div class="col-sm-8 col-md-8 col-xs-8">
                    <input class="form-control m-input" type="text" name="roleCode" id='roleCode'>
                </div>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-sm-12 col-md-12">
                <div class="col-sm-2 col-md-2 col-xs-2">
                    <label class="m-label required" for="roleState">角色状态</label>
                </div>
                <div class="col-sm-8 col-md-8 col-xs-8">
                    <select class="form-control m-input" name="roleState" id='roleState'>
                        <option value="1">正常</option>
                        <option value="0">禁用</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-sm-12 col-md-12">
                <div class="col-sm-2 col-md-2 col-xs-2">
                    <label class="m-label" for="roleDesc">角色描述</label>
                </div>
                <div class="col-sm-8 col-md-8 col-xs-8">
                    <textarea class="form-control m-textarea" name="roleDesc" id='roleDesc' cols="15" rows="4" maxlength="128"></textarea>
                </div>
            </div>
        </div>
    </lui:dialogBody>
    <lui:dialogFooter>
        <button class="btn btn-primary m-btn" type="button" onclick="RoleUpdatePage.updateRole()">保存</button>
        <button class="btn btn-default m-btn" type="button" data-dismiss="dialog-box">关闭</button>
    </lui:dialogFooter>
</form>
</body>
</u:View>